import React, { useState, useEffect, useRef } from "react";
import { Popconfirm, Button, Tag, message } from "antd";
import { PageContainer } from "@ant-design/pro-layout";
import { PlusOutlined } from "@ant-design/icons";
import ProTable from "@ant-design/pro-table";
import ProForm, { ModalForm } from "@ant-design/pro-form";
import { history, useLocation } from "umi";
import useCommonTable from "@/hooks/useCommonTable";

import { fetchOpenVipList } from "@/api/vip";

export default () => {
  const columns = [
    {
      title: "开通日期",
      dataIndex: "createTime",
      valueType: "dateTime",
      search:false,
    },
    {
      title: "用户姓名",
      dataIndex: "name",
    },
    {
      title: "用户手机号",
      dataIndex: "phoneNumber",
    },
    {
      title: "到期时间",
      dataIndex: "vipExpireDate",
      search: false,
    },
  ];
  return (
    <PageContainer>
      {useCommonTable({
        title: "会员",
        onlyColumns: true,
        columns,
        modalWidth: 700,
        fetchList:fetchOpenVipList,
        renderAdd: () => {},
        renderEdit: () => {},
        layout: "horizontal",
        actionColumnWidth: 200,
        showCheckbox: false,
      })}
    </PageContainer>
  );
};
